A device ID (identifier) is used to identify a member device in a multi-device system. One typical multi-device system is a stacking system. Stacking refers to combining multiple switching devices supporting a stacking feature and having the same hardware structure together to logically form a switching device.
The stacking system, where each switching device is referred to as a member switching device, specifically includes one master switching device and one or more slave switching devices. The master switching device is responsible for assigning device IDs to all member switching devices including the master switching device itself. A configuration file containing the device IDs and all or partial port configuration data is stored in the master switching device. The master switching device manages the entire stacking system according to the configuration file.
FIG. 1 is a schematic diagram of device IDs and corresponding ports in a stacking system, where the stacking system includes nine devices, which respectively are device 1, device 2, . . . , and device 9. Each device has multiple ports and each port has a port number. FIG. 1 also shows a port 2 of the device 9. When configuration information of a port is configured or acquired, the device ID and specific port number are used as a port index.
When a new device is added to and an existing device is removed from the stacking system, the device IDs of member devices in the system are changed. In such cases, if the corresponding relationship between the port configuration data and device ID of the device stored in the configuration database in the master device is not updated in time, the port configuration data cannot be indexed according to the device ID. For example, if the device ID of a device is changed from 9 to 8, when searching for the port configuration data according to the port index generated by the device ID 8 and port 2, either no corresponding configuration is found (assume that no device is set with an device ID 8 before), or the configuration of the port 2 of the original device 8 is found which is not the configuration of the port 2 of the device itself.
In summary, when a device ID is changed, a port index formed by the device ID and a port number cannot be used to correctly acquire port configuration data.